﻿<%@ Page Language="C#" MasterPageFile="~/DigitalTV.Master" AutoEventWireup="true" CodeBehind="ManterPrograma.aspx.cs" Inherits="UI.ManterPrograma" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   
    <div="Principal" style="width:400px">
    
    <div="Consulta" style="width:400px">
    <p>
        Consulta de Programas</p>
     <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                        onselectedindexchanged="GridView1_SelectedIndexChanged" 
                        DataSourceID="ObjectDataSource1">
         <Columns>
             <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" />
             <asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression="Nome" />
             <asp:BoundField DataField="Sinopse" HeaderText="Sinopse" 
                 SortExpression="Sinopse" />
             <asp:BoundField DataField="Duracao" HeaderText="Duracao" 
                 SortExpression="Duracao" />
             <asp:BoundField DataField="Tema" HeaderText="Tema" SortExpression="Tema" />
             <asp:TemplateField>
                 <ItemTemplate>
                     <asp:LinkButton ID="LbAtualizar" runat="server" onclick="LbAtualizar_Click">Atualizar</asp:LinkButton>
                 </ItemTemplate>
             </asp:TemplateField>
             <asp:TemplateField>
                 <ItemTemplate>
                     <asp:LinkButton ID="LbExcluir" runat="server" onclick="lbRemover_Click">Remover</asp:LinkButton>
                 </ItemTemplate>
             </asp:TemplateField>
         </Columns>
        </asp:GridView>
    
                    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                        DataObjectTypeName="Negocios.ProgramaBO" DeleteMethod="Excluir" 
                        InsertMethod="Insere" OldValuesParameterFormatString="original_{0}" 
                        SelectMethod="Consultar" TypeName="Negocios.ProgramaBOMetodos" 
                        UpdateMethod="Atualizar">
                        <SelectParameters>
                            <asp:Parameter Name="nome" Type="String" />
                            <asp:Parameter Name="tematica" Type="Int32" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
    
     </div>
    
    <div="Cadastro" class="divDados" style="width:400px">
    <p>
        Cadastro de Programa
        </p> 
        <p>
        <asp:Button ID="BtNovoPrograma" runat="server" Text="Novo Programa" 
                onclick="BtNovoPrograma_Click" />
        </p>
    <table>
        <tr>
            <td>
                <asp:Label ID="Label1" runat="server" Text="ID:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="TxID" runat="server" Width="275px" Enabled="False"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label2" runat="server" Text="Nome:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="TxNome" runat="server" Width="274px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label3" runat="server" Text="Tema:"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="DdTema" runat="server" Width="274px">
                    <asp:ListItem>Indefinido</asp:ListItem>
                    <asp:ListItem>Esporte</asp:ListItem>
                    <asp:ListItem>Saúde</asp:ListItem>
                    <asp:ListItem>Filme</asp:ListItem>
                    <asp:ListItem>Adulto</asp:ListItem>
                    <asp:ListItem>Infantil</asp:ListItem>
                    <asp:ListItem>Diversos</asp:ListItem>
                    <asp:ListItem></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label4" runat="server" Text="Duração:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="TxDuracao" runat="server" Width="275px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label5" runat="server" Text="Sinopse:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="TxSinopse" runat="server" Width="275px" TextMode="MultiLine"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="BtGravar" runat="server" Text="Gravar" 
                    onclick="BtGravar_Click" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="BtCancelar" runat="server" 
                    Text="Cancelar" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
    </table>
    </div>
    
    </div>
</asp:Content>